#ifndef __MAP_H
#define __MAP_H
#include <stdint.h>
#include "rbtree.h"

typedef struct{
    struct rb_node node;
    int key;
    uint32_t value;
}MyMapNode;

typedef struct rb_root map_head_t;

void mapInit(map_head_t *map_head);

int mapAdd(map_head_t *map_head,MyMapNode *insert_node);

MyMapNode *mapFind(map_head_t *map_head,int key);

int mapDelete(map_head_t *map_head,int key);

int mapChange(map_head_t *map_head,int key,uint32_t new_value);

int mapDestory(map_head_t *map_head);

void mapShow(map_head_t *map_head);

#endif